home *** CD-ROM | disk | FTP | other *** search
- Path: solon.com!not-for-mail
- From: Richard Wells <rdwells@mmm.com>
- Newsgroups: comp.lang.c,comp.lang.c.moderated,hp.unix,comp.sys.hp.apps,comp.sys.hp.hpux
- Subject: Re: C coding problem
- Date: 16 Mar 1996 12:51:19 -0600
- Organization: 3M Company
- Sender: clc@solutions.solon.com
- Approved: clc@solutions.solon.com
- Message-ID: <4if2j7$c7e@solutions.solon.com>
- References: <4ianbf$h86@solutions.solon.com>
- NNTP-Posting-Host: solutions.solon.com
- X-Mailer: Mozilla 2.0 (WinNT; I)
-
- Stephen Proctor wrote:
- > 1.) The following is the compilation line and the resulting warning message,
- >
- > % c89 shell.c -o shell
- > cc: "shell.c", line 98: warning 608: Illegal integer-pointer
- > combination in assignment.
- >
- > 2.) The program is as follows,
- >
- > #include <stdio.h>
- > #include <ctype.h>
- > #include <string.h>
- > #include <stdlib.h>
- >
- > main(int argc, char *argv[])
- > {
- > int ii;
- > int option_val = 0;
- > /* skip lines */
- > for (ii=1; ii<argc; ii++) {
- > /* skip lines */
- > /* The next line is the offending line */
- > if (*argv[ii] == '-') option_val = read_options;
- > /* skip lines */
- > return 0; /* Program executed successfully */
- > }
-
- It would help if you could reduce this to a minimal sample of
- compilable code that would reproduce the warning. This is
- obviously not it, since (1) the error occurs on line 98 and
- there are only about 20 lines of code here, and (2) you have
- no definition of read_options.
-
- In fact, I suspect that the problem lies with the type
- of read_options.
-